package com.tanhua.admin.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @ClassName Comment
 * @Description TODO    评论表
 * @Author JavaDev
 * @Date 2021/1/4 21:53
 * @Version 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document("quanzi_comment")
public class Comment implements Serializable {
    private static final long serialVersionUID = -5218915413828652056L;

    private ObjectId id;

    // 发布ID
    private ObjectId publishId;

    // 评论类型, 1-点赞, 2-评论, 3-喜欢
    private Integer commentType;

    // 评论内容
    private String content;

    // 评论人
    private Long userId;

    private Long publishUserId; //发布人的用户id


    // 是否为父节点,默认为否
    private Boolean isParent = false;

    // 父节点ID
    private ObjectId parentId;


    // 发表时间
    private Long created;
}